package com.fire.control.system.config.quartz;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

import org.quartz.DisallowConcurrentExecution;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.quartz.PersistJobDataAfterExecution;

@PersistJobDataAfterExecution
@DisallowConcurrentExecution
public class TestJob implements Job {

	@Override
	public void execute(JobExecutionContext context) throws JobExecutionException {
		String jobName = (String)context.getMergedJobDataMap().get("job");
		System.out.println(DateTimeFormatter.ofPattern("HH:mm:ss").format(LocalDateTime.now())+" 动态定时任务------->"+jobName);
	}

}